const Product = class Product{
  constructor(props){
    this.size = props.size,
    this.page = props.page,
    this.productName = props.productName,
    this.status = props.status,
    this.creatTime = props.creatTime,
    this.modifyTime = props.modifyTime
  }
  getState(){
    let x= {}
    // 产品名称
    if(this.productName){
      x.productName = this.productName
    }
    // 状态
    if(this.status){
      x.status = this.status
    }
    // 添加时间
    if(this.creatTime){
      x.gmtCreateStart = this.creatTime ? getTimestamp(this.creatTime[0]) : undefined;
      x.gmtCreateEnd = this.creatTime ? getTimestamp(this.creatTime[1])+ 86399999 : undefined;
    }
    // 修改时间
    if(this.modifyTime){
      x.gmtModifiedStart = this.modifyTime ? getTimestamp(this.modifyTime[0]) : undefined;
      x.gmtModifiedEnd = this.modifyTime ? getTimestamp(this.modifyTime[1])+ 86399999 : undefined;
    }
    x.size = this.size
		x.page = this.page
		return x
  }
}

export  default Product
